home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ETO Development Tools 4
/
ETO Development Tools 4.iso
/
Tools - Objects
/
Virtual User 1.0
/
Virtual User
/
MPW Scripts
/
PickTarget_vu
< prev
next >
Wrap
Text File
|
1991-01-25
|
2KB
|
67 lines
#
# File: PickTarget_vu
#
# Contains: This script lets the user pick a target machine through a simple dialog.
# It searches the current zone for all machines currently running 'Agent VU',
# and collects them in a list. This list is presented to the user and the
# user is asked to select one of the listed machines.
#
# Dependent on:
# variable VUTargetZone # See PickTargetZone_vu.
#
#
# Written by: Chad Williams
#
# Copyright: © 1989-91 by Apple Computer, Inc., all rights reserved.
#
# Change History:
#
# 1/9/91 chad creation
#
SET Exit 0
SET TargetAddress ''
SET TargetList "`choose "{VUTargetZone}:∂≈" -list -type "Agent VU" ≥ "Dev:Null"`"
IF ("{TargetList}" == '')
ALERT "∂nThere aren't any machines running 'Agent VU'∂nin the Target Zone '{VUTargetZone}'."
EXIT 1
END
SET TargetAddress "`getlistitem -s -q {TargetList} ≥ "Dev:Null"`"
Set TempVar `Evaluate "{TargetAddress}" =~ /(≈)®1:([¬:]+)®2:«0,1»/`
IF ({TempVar} != 0)
Set TempVar "{®1}"
Set Tempzone `Evaluate "{TempVar}" =~ /∂'(≈)®1/`
IF ({Tempzone} != 0)
Set Tempzone "{®1}"
ELSE
Set Tempzone "{TempVar}"
END #remove front single quote if present
IF ("{Tempzone}" == '')
Set Tempzone "*"
END #set zone to local
SET VUTargetZone "{Tempzone}"
TARGET "{VUSettings}"
FIND 1
ECHO "{Tempzone}" > §
CLOSE -y "{VUSettings}"
Set TempVar "{®2}"
IF ("{TempVar}" != '')
Set Tempobject `Evaluate "{TempVar}" =~ /(≈)®1∂'/`
IF ({Tempobject} != 0)
Set Tempobject "{®1}"
ELSE
Set Tempobject "{TempVar}"
END #remove end single quote if present
SET VUTargetName "{Tempobject}"
TARGET "{VUSettings}"
FIND 2
ECHO "{Tempobject}" > §
CLOSE -y "{VUSettings}"
END
END #If evaluated true